package com.xxr.mom.ci.charging.mapper.device;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xxr.mom.ci.charging.device.entity.Gun;
import com.xxr.mom.ci.charging.dynamic.DB;
import com.xxr.mom.ci.charging.dynamic.DataSourceEnum;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author natsuki_kining
 */
@Repository
@DB(DataSourceEnum.CI_CHARGING_DEVICE)
public interface GunMapper extends BaseMapper<Gun> {

    /**
     * 根据站点id查询充电枪数据
     *
     * @param stationId
     * @return
     */
    List<Gun> selectByStationId(@Param("stationId") Long stationId);

    /**
     * 根据充电桩id查询充电枪集合数据
     *
     * @param pileId 充电桩id
     * @return 充电枪集合
     */
    List<Gun> selectByPileId(@Param("pileId") Long pileId);

    /**
     * 根据connectorId 查询枪数据
     * @param connectorId
     * @return
     */
    Gun selectByConnectorId(@Param("connectorId") String connectorId);

}
